<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:h="http://xmlns.jcp.org/jsf/html">

    <p:panelGrid id="pgrid" columns="4" style="width:100%;">
        
        <f:facet name="header">
            Salvar
        </f:facet>
        
        <h:outputLabel for="nome" value="Nome:" />
        <p:inputText value="#{pessoaMB.pessoa.nome}" id="nome"  style="width:97%;" required="true"/>

        <h:outputLabel for="mskcpf" value="CPF:" />
        <p:inputMask mask="999.999.999-99"  value="#{pessoaMB.doc.cpf}" id="mskcpf"/>        
        
        <h:outputLabel for="mskcpf" value="RG:" />
        <p:inputMask mask="99.99-999"  value="#{pessoaMB.doc.rg}" id="mskrg"/>        
        
        <h:outputLabel for="dtnasc" value="Nasc:" />
        <p:calendar value="${pessoaMB.pessoa.dtNasc}" id="dtnasc" pattern="dd/MM/yyyy">  
            <f:convertDateTime pattern="dd/MM/yyyy" locale="pt,BR" type="date"/>
        </p:calendar>        
        
        <h:outputLabel for="options" value="Sexo:" />
        <p:selectOneRadio id="options" value="#{pessoaMB.pessoa.sexo}" style="border: activecaption">  
            <f:selectItem itemLabel="Masculino" itemValue="1" />  
            <f:selectItem itemLabel="Feminino" itemValue="2" />
        </p:selectOneRadio>        
        
        <h:outputLabel for="cotato" value="Fone:" />
        <p:inputMask mask="(99)9999.9999"  value="#{pessoaMB.pessoa.fone}" id="cotato"/>
        
        <h:outputLabel for="login" value="Login:" />
        <p:inputText value="#{pessoaMB.login.usuario}" id="login"/>
                
        <h:outputLabel for="senha" value="Senha:" />
        <p:password  value="#{pessoaMB.login.senha}" id="senha"/>               
        
        <f:facet name="footer">
            <center>
                Salvar                
            </center>
        </f:facet>
    </p:panelGrid>
</html>
